<template>
    <view class="pub_page pub_notice pub_header_padding">
        <pub-head headerName="notice" :headerConfig="headerConfig"></pub-head>
        <z-paging ref="Zpaging" class="pub_page_scroll page_box" v-model="list" @query="getList" :refresher-enabled="false"
            :fixed="false">
            <div class="lis_div">
                <div class="li" v-for="(li, key) in list" :key="key"
                    @click="$comFun.openWin('/pages/other/document', { id: li.noticeId })">
                    <div class="yuan"></div>
                    <div class="line"></div>
                    <div class="p_1">{{ li.noticeTitle }}</div>
                    <div class="p_2">{{ li.createTime }}</div>
                </div>
            </div>
        </z-paging>
    </view>
</template>

<script>
export default {
    data() {
        return {
            pagescrollTop: 0,
            headerConfig: {
                title: '平台公告',//标题栏内容
                title_color: '#000',
                left_type: 3,//左侧区域类型  0不出现  1文字  2图片  3返回按钮
                left_content: 'dark',
                header_color:'#fff'
            },

            list: []
        };
    },
    onLoad() {
        setTimeout(() => {
            this.$comFun.openLoading();
            this.$refs.Zpaging.reload()
        }, 400);
    },
    onPageScroll(res) {
        this.pagescrollTop = res.scrollTop;
    },
    methods: {
        async getList(pageNo, pageSize) {
            const res = await this.$request.get('public/getNoticeList', {
                pageNo: pageNo,
                pageSize: pageSize,
            });
            this.$comFun.closeLoading();
            // console.log(res);
            if (res.code == 200) {
                this.$refs.Zpaging.complete(res.result.records);
            } else {
                this.$refs.Zpaging.complete(false);
            }
        }
    },
};
</script>

<style lang="scss" scoped>
@import "@/common/css/other.scss";
</style>
